"""
猜数字游戏
"""
import random
answer = random.randint(1, 100)
count = 0
while count < 7:
    count += 1
    number = int(input("请输入您猜的数字(1-100): "))
    if number < answer:
        print("您猜的数字小了")
    elif number > answer:
        print("您猜的数字大了")
    else:
        print("恭喜您,猜对了")
        break
if count == 7:
    print("很遗憾,您没有猜对,正确答案是:", answer)